import * as types from "./mutation-types";
export const expandMenu = ({ commit }, menuItem) => {
  if (menuItem) {
    menuItem.expanded = menuItem.expanded || false;
    commit(types.EXPAND_MENU, menuItem);
  }
};

export const switchEffect = ({ commit }, effectItem) => {
  if (effectItem) {
    commit(types.SWITCH_EFFECT, effectItem);
  }
};

export const islogin = ({ commit }) => commit(types.ISLOGIN);

export const loggingIn = ({ commit }) => commit(types.LOGGINGIN);

export const loggedIn = ({ commit }) => commit(types.LOGGEDIN);

export const setUser = ({ commit }, payload) => commit(types.SET_USER, payload);

export const operationUser = ({ commit }) => commit(types.OPERATION_USER);
